package org.zasadnyy.redlions.players.client.ds;

import org.zasadnyy.redlions.players.shared.model.TournamentItem;

import com.smartgwt.client.data.Record;

public class TournamentRecord extends Record {

	public TournamentRecord(TournamentItem tournamentItem) {
		setAttribute(TournamentItem.ID, tournamentItem.getId());
		setAttribute(TournamentItem.TITLE, tournamentItem.getTitle());
		setAttribute(TournamentItem.URL, tournamentItem.getUrl());
		setAttribute(TournamentItem.TIME, tournamentItem.getTime());
		setAttribute(TournamentItem.PLAYERS, tournamentItem.getPlayerIds().toArray(new String[0]));
	}

}
